import Home from "../views/Home.vue"
import Register from "../views/Register.vue"
import Login from "../views/Login.vue"
import Vue from "vue"
import VueRouter from "vue-router"
import About from "../views/About.vue"
import Friends from "../views/Friends.vue"

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/about",
    name: "About",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: About,
  },
  {
    path: "/regist",
    name: "Regist",
    component: Register,
  },
  {
    path: "/login",
    name: "Login",
    component: Login,
  },
  {
    path: "/friends",
    name: "Friends",
    component: Friends,
  },
]

const router = new VueRouter({
  routes: routes,
})

export default router
